#include "KeyPointOverlay.h"
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/imgproc/imgproc.hpp>

KeyPointOverlay::KeyPointOverlay(void) : Filter(2,1)
{
}


KeyPointOverlay::~KeyPointOverlay(void)
{
}

void KeyPointOverlay::Process()
{
	outputs[0] = inputs[0]->clone();

	for (int i = 0; i < inputs[1]->rows; ++i)
	{
		float *p = inputs[1]->ptr<float>(i);
		
		cv::Point2f pt = cv::Point2f(p[0], p[1]);
		float size = p[2];
		float angle = p[3];

		cv::circle(outputs[0], pt, size / 2.0, cv::Scalar(255,0,0));
	}
}
